import 'package:seedfour/generated/json/base/json_convert_content.dart';
import 'package:seedfour/app/models/case_order_list_entity.dart';
import 'package:seedfour/app/models/case_detail_entity.dart';


CaseOrderListEntity $CaseOrderListEntityFromJson(Map<String, dynamic> json) {
  final CaseOrderListEntity caseOrderListEntity = CaseOrderListEntity();
  final List<CaseOrder>? userOrderList = (json['userOrderList'] as List<
      dynamic>?)?.map(
          (e) => jsonConvert.convert<CaseOrder>(e) as CaseOrder).toList();
  if (userOrderList != null) {
    caseOrderListEntity.userOrderList = userOrderList;
  }
  return caseOrderListEntity;
}

Map<String, dynamic> $CaseOrderListEntityToJson(CaseOrderListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['userOrderList'] = entity.userOrderList?.map((v) => v.toJson()).toList();
  return data;
}

extension CaseOrderListEntityExtension on CaseOrderListEntity {
  CaseOrderListEntity copyWith({
    List<CaseOrder>? userOrderList,
  }) {
    return CaseOrderListEntity()
      ..userOrderList = userOrderList ?? this.userOrderList;
  }
}